home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
ugly174.zip
/
RSB5UGLY.MRG
< prev
next >
Wrap
Text File
|
1992-07-05
|
43KB
|
1,057 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against RELEASE\RBBSSUB5.BAS to produce RBBSSUB5.BAS
* RELEASE\RBBSSUB5.BAS: Date 6-20-1992 Size 116575 bytes
* ------------[ Created 07-04-1992 19:44:06 ]------------
* REPLACING old line(s) by new
20120 ZOutTxt$ = "Scanning Directory " + _
ZFileNameHold$
IF WasRS$ <> "" THEN _
ZOutTxt$ = ZOutTxt$ + " for " + WasRS$
GOSUB 21650
IF ZFileSysParm > 1 THEN _
RETURN
CALL AskMore ("",ZTrue,ZTrue,ZAnsIndex,ZFalse)
IF ZNo THEN _
ZErrCode = 0 : _
* ------[ first line different ]------
CALL SkipLine (1) : _ ' UG070501
RETURN
WasPG = ZTrue
* REPLACING old line(s) by new
20122 CALL OpenWork (2,ZFileName$)
IF ZErrCode = 53 THEN _
ZOutTxt$ = "Missing File " + ZFileName$ : _
CALL UpdtCalr (ZOutTxt$,2) : _
ZOutTxt$ = ZOutTxt$ + _
* ------[ first line different ]------
". Please tell SysOp." : _ ' UG070501
GOSUB 21640 : _ ' UG070501
RETURN
ZJumpSupported = ZTrue
ZJumpLast$ = ""
LastOK = ZFalse
ZJumpSearching = ZFalse
MaxPrint = ZPageLength - 1
CALL CmdStackPushPop (1)
ZLastIndex = 0
* REPLACING old line(s) by new
20140 LastOK = ZTrue
GOSUB 21650
IF ZFileSysParm > 1 THEN _
RETURN
IF ZLinesPrinted > MaxPrint THEN _
ZTurboKey = -ZTurboKeyUser : _
CALL AskMore (",M)ark",ZTrue,ZTrue,ZAnsIndex,ZFalse) : _
IF ZNo THEN _
* ------[ first line different ]------
CALL SkipLine (1) : _ ' UG070501
ZErrCode = 0 : _
RETURN _
ELSE Temp$ = ZUserIn$(1) : _
CALL AskItems ("M",Temp$,ZTrue,"File",ZMarkedFiles$) : _ ' UG070501
ZUserIn$(1) = ""
IF ZJumpSearching THEN _
IF LEFT$(ZOutTxt$,1) <> " " THEN _
PrevSearch$ = WasRS$ : _
PrevCK = WasCK : _
WasCK = 2 : _
WasRS$ = ZJumpTo$
IF NOT ZRet THEN _
GOTO 20124
* REPLACING old line(s) by new
20142 ZWasQ = 0
* ------[ first line different ]------
CALL SkipLine (1) ' UG070501
CALL CmdStackPushPop (2)
ZJumpSupported = ZFalse
CLOSE 2
CALL Carrier
IF ZSubParm = -1 THEN _
ZFileSysParm = 7
RETURN
'
' * L - COMMAND FROM FILES MENU (LIST DIRECTORY)
'
* REPLACING old line(s) by new
* ------[ first line different ]------
20155 IF ListNew OR ZAnsIndex > 255 THEN ' UG070501
IF ZSearchingAll THEN CALL SkipLine (1) ' UG070501
RETURN ' UG070501
END IF
CALL GetDirs (ShowDirOfDir)
IF ZWasQ = 0 THEN _
RETURN
ShowDirOfDir = ZFalse
CALL ConvertDir (ZAnsIndex)
WasQX = ZLastIndex
* REPLACING old line(s) by new
20159 IF ZAnsIndex < ZLastIndex THEN _
GOTO 20155
ZSearchingAll = ZFalse
CALL CmdStackPushPop (1)
ZLastIndex = 0
IF ZNo OR InFMS OR (ZFileNameHold$ = ZDirPrefix$) THEN _
GOTO 20155
GOSUB 20178
CALL QuickTPut (ZEmphasizeOff$,0)
ZTurboKey = - ZTurboKeyUser
* ------[ first line different ]------
ZOutTxt$ = "End List. L)ist Again, M)ark, D)ownload, [Q]uit" ' UG070501
GOSUB 21667
CALL AraAllCaps (ZUserIn$(),1)
IF ZUserIn$(1) = "L" THEN _
ZUserIn$(ZAnsIndex) = WasA1$ : _
GOTO 20161
Temp$ = ZUserIn$(1)
Temp = (ZUserIn$(1) = "D")
CALL AskItems ("MD",Temp$,ZTrue,"File",ZMarkedFiles$) ' UG070501
IF ZWasQ = 0 OR ZUserSecLevel < ZOptSec(19 - 20 * (ZMenuIndex = 6)) THEN _
GOTO 20160
IF Temp THEN _
GOSUB 20202 _
ELSE IF LEN(ZUserIn$(1)) > 1 THEN _
ZAnsIndex = 1 : _
GOSUB 20202
* REPLACING old line(s) by new
20162 CALL CmdStackPushPop (1) ' save dir list list processing
CALL FMS (ZWasZ$,SearchString$,SearchDate$,InFMS, _
ZCategoryName$(),ZCategoryCode$(),ZCategoryDesc$(),_
DnldFlag,CatFound,ZAnsIndex)
WHILE DnldFlag > 0 AND ZSubParm > -1
GOSUB 20202
IF ZFileSysParm > 1 THEN _
RETURN
WasX$ = ZCategoryCode$(CatFound)
CALL DispUpDir (WasX$,SearchString$,SearchDate$,DnldFlag,ZAnsIndex)
CALL CheckTimeRemain (MinsRemaining)
IF ZSubParm = -1 THEN _
ZFileSysParm = 6 : _
RETURN
CALL Carrier
WEND
IF ZSubParm = -1 THEN _
ZFileSysParm = 7 : _
RETURN
IF ZAnsIndex > 255 OR ZRet THEN _
ZLastIndex = 0 : _
RETURN
CALL CmdStackPushPop (2) ' restore dir list list processing
ZActiveFMSDir$ = ""
IF InFMS THEN _
GOTO 20159
IF ZUserSecLevel < ZMinSecToView THEN _
IF ZFileNameHold$ = ZUpldDirCheck$ THEN _
* ------[ first line different ]------
ZFileNameHold$ = "of Uploads" : _ ' UG070501
GOTO 20172
ZFileNameHold$ = ZUserIn$(ZAnsIndex)
IF ZLimitSearchToFMS THEN _
GOTO 20166
IF NOT ZSearchingAll THEN _
IF ZFileNameHold$ = "ALL" OR ZFileNameHold$ = "A" THEN _
ZSearchingAll = ZTrue : _
GOSUB 21890 : _
GOTO 20157
CALL BadFile (ZFileNameHold$,BadFileNameIndex)
ON BadFileNameIndex GOTO 20163,20172,20176
* REPLACING old line(s) by new
20172 IF NOT ZSearchingAll THEN _
ZOutTxt$ = "Directory " + _
ZFileNameHold$ + _
* ------[ first line different ]------
" Not Found." : _ ' UG070501
GOSUB 21640 : _
ZNo = ZTrue : _
IF ZFileSysParm > 1 THEN _
RETURN
GOTO 20155
* REPLACING old line(s) by new
20180 Temp$ = "D"
* ------[ first line different ]------
CALL AskItems ("D",Temp$,ZFalse,"File",ZMarkedFiles$) ' UG070501
GOSUB 20178
IF ZFileSysParm > 1 THEN _
RETURN
IF ZWasQ = 0 THEN _
RETURN
* REPLACING old line(s) by new
20205 MarkingTime = (ZAnsIndex = FirstDnld OR NOT ZConcatFIles)
* ------[ first line different ]------
CALL AllCaps (ZUserIn$(ZAnsIndex)) ' UG070501
ZFileName$ = ZUserIn$(ZAnsIndex)
CALL Remove (ZFileName$,", ")
ZViolation$ = "Download "
IF ZListOnly THEN _
CALL BreakFileName (ZFileName$,DR$,ZWasY$,WasX$,ZTrue) : _
ZFileNameHold$ = ZWasY$ + _
WasX$ : _
GOTO 20235
ZFileNameHold$ = ZFileName$
CALL BadFile (ZFileName$,BadFileNameIndex)
ON BadFileNameIndex GOTO 20220,20231,20233
* REPLACING old line(s) by new
20231 ZOutTxt$ = ZFileNameHold$ + _
* ------[ first line different ]------
" Not Found" ' UG070501
CALL UpdtCalr (ZOutTxt$,2)
IF ZAutoDownInProgress THEN _
ZOutTxt$ = ZOutTxt$ + _
" During AutoDownload." : _ ' UG070501
GOSUB 21640 : _
RETURN
ZOutTxt$ = ZOutTxt$ + _
". Enter the Correct Filename"+ZPressEnterExpert$ ' UG070501
ZSuspendAutoLogoff = ZTrue
GOSUB 21660
ZSuspendAutoLogoff = ZFalse
IF ZFileSysParm > 1 THEN _
RETURN
IF ZWasQ=0 THEN _
IF ZBatchTransfer AND ZAnsIndex >= LastDnld THEN _
GOTO 20262 _
ELSE ZAutoLogOffReq = ZFalse : _
RETURN
ZUserIn$(ZAnsIndex) = ZUserIn$(1)
GOTO 20205
* REPLACING old line(s) by new
20244 IF ZUserSecLevel < VAL(ZWorkAra$(2)) THEN _
GOTO 20245
FilePswd$ = ZWorkAra$(3)
IF FilePswd$ = "" THEN _
GOTO 20247
CALL AllCaps (FilePswd$)
IF FilePswd$ = ZPswd$ THEN _
GOTO 20247
* ------[ first line different ]------
ZOutTxt$ = "Enter a Password for " + _ ' UG070501
ZFileName$
GOSUB 21660
IF ZFileSysParm > 1 THEN _
RETURN
IF ZWasQ = 0 THEN _
RETURN
CALL AraAllCaps (ZUserIn$(),1)
IF ZUserIn$(1) = FilePswd$ THEN _
GOTO 20247
* REPLACING old line(s) by new
20247 ZWasDF = 0
CALL BreakFileName (ZFileName$,DR$,WasX$,Extension$,ZFalse)
IF ZAutoDownInProgress THEN _
ZUserIn$(ZAnsIndex) = WasX$ + "." + Extension$ : _
* ------[ first line different ]------
ZOutTxt$ = "Transferring: " + _ ' UG070501
ZUserIn$(ZAnsIndex) : _
GOSUB 21640 : _
IF ZFileSysParm > 1 THEN _
RETURN
IF INSTR("...WRK.FW .ARC.EXE.COM.OBJ.WKS.LBR.ZIP.PAK.ZOO.LZH.ARJ.","."+Extension$+".") > 2 OR _
MID$(Extension$,2,1) = "Q" OR _
(ZRequireNonASCII AND Extension$ = "BAS") THEN _
ZWasDF = ZTrue
* REPLACING old line(s) by new
20248 ZOutTxt$ = ""
IF ZBatchTransfer THEN _
IF ZAnsIndex < LastDnld THEN _
GOTO 20260
CALL XferType (2,ZTrue)
IF ZFF THEN _
GOTO 20260
* ------[ first line different ]------
CALL SkipLine (1) ' UG070501
CALL XferType (1,ZTrue)
IF ZSubParm = -1 THEN _
ZFileSysParm = 7 : _
RETURN
* REPLACING old line(s) by new
20292 GOSUB 20750
IF ZFileSysParm > 1 OR NOT ZOK THEN _
RETURN
* ------[ first line different ]------
WasA1$ = "Send" ' UG070501
GOSUB 20320
IF ZFileSysParm > 1 THEN _
RETURN
IF ZLocalUser THEN _
CALL QuickTPut2 ("Sorry, Protocol Not Available Locally.") : _ ' UG070501
RETURN
IF ZAutoDownInProgress THEN _
GOSUB 20294 : _
IF ZAbort THEN _
RETURN
GOSUB 21300
IF ZFileSysParm > 1 THEN _
RETURN
ZOutTxt$ = ""
GOTO 20390
* REPLACING old line(s) by new
* ------[ first line different ]------
20318 ZOutTxt$ = "Please Switch to N,8,1 for Transfer."
GOSUB 21630
IF ZFileSysParm > 1 THEN _
RETURN
CALL DelayTime (3)
RETURN
* REPLACING old line(s) by new
20330 IF ZAutoDownInProgress THEN _
RETURN
GOSUB 20337
* ------[ first line different ]------
ZOutTxt$ = "Protocol : " + ZProtoPrompt$ ' UG070501
GOSUB 21640 ' UG070501
ZOutTxt$ = "Ready to " + WasA1$ + " " + ZFileNameHold$ + ", ^X Aborts." ' UG070501
GOSUB 21650
* REPLACING old line(s) by new
20340 IF ZWasDF THEN _
* ------[ first line different ]------
ZOutTxt$ = "ASCII Protocol Can't Transfer Binary Files." : _ ' UG070501
GOSUB 21650 : _
GOTO 21700
GOSUB 20750
IF ZFileSysParm > 1 OR NOT ZOK THEN _
RETURN
CALL OpenWork (2,ZFileName$)
IF (ZAnsIndex = FirstDnld OR NOT ZConcatFIles) THEN _
GOSUB 20337 : _
ZOutTxt$ = "Press ^X to Abort, ^S to Pause (^Q to Resume)" : _ ' UG070501
GOSUB 21640 : _
IF ZFileSysParm > 1 THEN _
RETURN _
ELSE ZOutTxt$ = ZProtoPrompt$ + " Send of " + _
ZFileNameHold$ + _
" Ready. Press a Key to Start" : _ ' UG070501
ZTurboKey = 2 : _
ZForceKeyboard = ZTrue : _
ZSuspendAutologoff = ZTrue : _
GOSUB 21660 : _
ZSuspendAutologoff = ZFalse : _
GOSUB 20335 : _
IF ZFileSysParm > 1 THEN _
RETURN
* REPLACING old line(s) by new
20395 GOSUB 21640
IF ZFileSysParm > 1 THEN _
RETURN
* ------[ first line different ]------
ZOutTxt$ = "Enter the Correct Name of the File to Upload" + _ ' UG070501
ZPressEnterExpert$
GOSUB 21660
IF ZFileSysParm > 1 THEN _
RETURN
IF ZWasQ = 0 THEN _
RETURN
ZUserIn$(ZAnsIndex) = ZUserIn$(1)
GOTO 20435
* REPLACING old line(s) by new
* ------[ first line different ]------
20420 ZOutTxt$ = "Upload What Files" + ZPressEnter$ ' UG070501
GOSUB 21667
RETURN
'
' * SEARCH FOR DUPLICATE FILENAME
'
* REPLACING old line(s) by new
* ------[ first line different ]------
20435 CALL AllCaps (ZUserIn$(ZAnsIndex)) ' UG070501
ZFileNameHold$ = ZUserIn$(ZAnsIndex) ' UG070501
ExtSrch = ZFalse
IF INSTR(ZFileNameHold$,".") = 0 THEN _
ZFileNameHold$ = ZFileNameHold$ + "." + ZDefaultExtension$
CALL AllCaps(ZFileNameHold$)
ZFileName$ = ZFileNameHold$
ZViolation$ = "Upload "
CALL NoPath (ZFileName$,BadFileNameIndex)
IF BadFileNameIndex THEN _
GOTO 20451
CALL BadFile (ZFileName$,BadFileNameIndex)
ON BadFileNameIndex GOTO 20440,20451,20515
* REPLACING old line(s) by new
* ------[ first line different ]------
20451 ZOutTxt$ = "Invalid File Name." ' UG070501
GOTO 20395
* REPLACING old line(s) by new
20452 IF ZUserSecLevel < ZOverWriteSecLevel THEN _
GOTO 20453
IF ExtSrch AND (WasX$ + "." + Check$) <> ZFileName$ THEN _
* ------[ first line different ]------
ZOutTxt$ = "Warning: " + _
WasX$ + "." + Check$ + " is Already Here, " + _
"Upload Anyway (Y,[N])" _ ' UG070501
ELSE ZOutTxt$ = "Overwrite This File (Y,[N])" ' UG070501
GOSUB 21660
IF ZFileSysParm > 1 THEN _
RETURN
IF NOT ZYes THEN _
GOTO 20453
ZWasZ$ = ZFileName$
CALL KillWork (ZFileName$)
IF ZErrCode <> 0 AND ZErrCode <> 53 THEN _
ZOutTxt$ = "Error Overwriting File." : _ ' UG070501
GOSUB 21660 : _
RETURN
GOTO 20475
* REPLACING old line(s) by new
* ------[ first line different ]------
20454 CALL QuickTput2 ("Thanks, But " + ZFileNameHold$ + " is Already Here." ) ' UG070501
CALL UpdtCalr ("Upload duplicate " + ZFileNameHold$,1)
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
20455 ZOutTxt$ = "Add a New File Directory Entry (Y,[N])" ' UG070501
ZTurboKey = - ZTurboKeyUser
GOSUB 21660
IF ZFileSysParm > 1 THEN _
RETURN
IF NOT ZYes THEN _
RETURN
GOSUB 20460
IF WhoTo$ = "" THEN _
RETURN
AddingDescOnly = ZTrue
ZWasFT$ = "l"
GOSUB 20702
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
20475 CALL SkipLine (1) ' UG070501
ZWasZ$ = ZUpldDriveFile$ ' UG070501
CALL FindFree
IF VAL(ZFreeSpace$) < 4096 THEN _
GOSUB 21895 : _
IndexSave = ZLastIndex + 1 : _
RETURN
ZOutTxt$ = "Upload Disk has" + _ ' UG070501
ZFreeSpace$
GOSUB 21640
IF ZFileSysParm > 1 THEN _
RETURN
ZLine25$ = "(U) " + _
ZFileNameHold$
ZSubParm = 2
CALL Line25
ZOutTxt$ = ""
ZOK = ZTrue
* REPLACING old line(s) by new
* ------[ first line different ]------
20510 WasD$ = "<Esc> by SysOp Aborts" ' UG070501
GOSUB 21710
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
20542 WasA1$ = "Receive" ' UG070501
GOSUB 20320
IF ZFileSysParm > 1 THEN _
RETURN
ZOK = ZTrue
GOSUB 20860
IF ZFileSysParm > 1 THEN _
RETURN
IF ZOK THEN _
GOTO 20700
GOTO 20730
'
' * ASCII UPLOAD
'
* REPLACING old line(s) by new
20560 LineACK = (ZDefaultLineACK$ <> "")
IF LineACK THEN _
* ------[ first line different ]------
ZOutTxt$ = "Acknowledge Each Line ([Y],N)" : _ ' UG070501
ZTurboKey = - ZTurboKeyUser : _
LineACK = NOT ZNo : _
GOSUB 21660 : _
IF ZFileSysParm > 1 THEN _
RETURN
GOSUB 20337
CALL QuickTPut1 ("End the Transfer with a ^K") ' UG070501
CALL QuickTPut1 (ZProtoPrompt$+" Receive of " + ZFileNameHold$ + " Ready.") ' UG070501
ZOK = ZFalse
XOff = ZFalse
CALL OpenOutW(ZFileName$)
IF ZErrCode <> 0 AND ZErrCode <> 53 THEN _
ZWasEL = 20560 : _
GOTO 21900
GOSUB 20510
IF ZFileSysParm > 1 THEN _
RETURN
* REPLACING old line(s) by new
20670 ZOutTxt$ = ZXOff$ + _
* ------[ first line different ]------
"System Error, Upload Aborted. Press ^K." ' UG070501
* REPLACING old line(s) by new
20702 CALL UpdtUpload (ZCategoryName$(),ZCategoryCode$(), ZLinesInMsg)
IF NOT ZGetExtDesc THEN _
ZPrivateDoor = ZFalse : _
GOTO 20710
* ------[ first line different ]------
ZMsgHeader$ = "Ext. Description" ' UG070501
ZSysopComment = ZTrue
ZMaxMsgLines = ZMaxExtendedLines
WasLL = ZRightMargin
ZRightMargin = 30 + ZMaxDescLen
IF ZRightMargin > 74 THEN _
ZRightMargin = 74
ZFileSysParm = 5
RETURN
* REPLACING old line(s) by new
20730 GOSUB 21780
* ------[ first line different ]------
CALL QuickTPut2 ("Upload Aborted.") ' UG070501
LastUpld = 0
ZPrivateDoor = ZFalse
* REPLACING old line(s) by new
20745 ZOutTxt$ = ZXOff$ + _
* ------[ first line different ]------
"SysOp Aborted Upload. Stop Your Transfer and Press ^K." ' UG070501
GOTO 20675
'
' * CALCULATE DOWNLOAD TIME ESTIMATE
'
* REPLACING old line(s) by new
20760 IF ZErrCode <> 0 THEN _
* ------[ first line different ]------
CALL QuickTPut1 ("System Error: Can't Open "+ZFileNameHold$) : _ ' UG070501
CALL UpdtCalr ("Unable to access "+ZFileName$,2) : _
ZOK = ZFalse : _
ZErrCode = 0 : _
ZBytesInFile# = 0 : _
RETURN
ZBytesInFile# = LOF(2)
ZNumDnldBytes! = LOF(2)
ZOK = ZTrue
IF SizeOnly THEN _
SizeOnly = ZFalse : _
RETURN
ZBlocksInFile# = MaxBlock
IF ZBatchTransfer THEN _
BatchBlocks# = BatchBlocks# + ZBlocksInFile# : _
BatchBytes# = BatchBytes# + ZBytesInFile# : _
CALL OpenWorkA (ZNodeWorkFile$) : _
CALL PrintWorkA (ZFileName$) : _
ZDownFiles = ZDownFiles + 1 : _
CLOSE 2 : _
RETURN
ZDownFiles = 1
* REPLACING old line(s) by new
20780 ZOutTxt$ = "File Size :"
ZOK = ZTrue
IF ZBlockSize > 0 THEN _
ZOutTxt$ = ZOutTxt$ + _
STR$(FIX(ZBlocksInFile#)) + _
* ------[ first line different ]------
" Blocks," ' UG070501
* REPLACING old line(s) by new
20785 ZBlocksInFile# = ZBlocksInFile# / _
VAL(MID$("000003000450120024004800720096012001440168019203840", -4 * ZCBPS, 4))
ZBlocksInFile# = ZBlocksInFile# * ZFLen / ZSpeedFactor!
IF (ZAnsIndex > 1 AND ZConcatFIles) THEN _
RETURN
ZOutTxt$ = ZOutTxt$ + _
STR$(ZBytesInFile#) + _
* ------[ first line different ]------
" Bytes" ' UG070501
GOSUB 21630 ' UG070501
IF ZFileSysParm > 1 THEN _
RETURN
IF ZBytesInFile# < 1 THEN _
RETURN
* REPLACING old line(s) by new
20790 ZSubParm = 2
CALL Line25
ZOutTxt$ = "Transfer Time:" + _
STR$(INT(ZBlocksInFile# / 60)) + _
* ------[ first line different ]------
" Minutes," + _
STR$(INT(ZBlocksInFile# - (INT(ZBlocksInFile# / 60) * 60))) + _
" Seconds" ' UG070501
GOSUB 21650
IF ZFileSysParm > 1 THEN _
RETURN
* REPLACING old line(s) by new
20791 CALL CheckTimeRemain (MinsRemaining)
IF ZSubParm = -1 THEN _
ZFileSysParm = 6 : _
RETURN
ZOK = ZTrue
Temp = ZExtraDnldTime
CALL ChkAddedTime (Temp)
Temp = MinsRemaining + Temp
ZWasA = INT(ZBlocksInFile# / 60) + 1
IF ZWasA <= Temp THEN _
GOTO 20793
ZOutTxt$ = "Not enough minutes left! Need" + STR$(ZWasA) + _
" have" + STR$(Temp)
CALL UpdtCalr (ZOutTxt$,2)
* ------[ first line different ]------
ZOutTxt$ = "Sorry, Not Enough Time Left (Only " + MID$(STR$(Temp),2) + _
" Mins Left)" ' UG070501
CALL SkipLine (1) ' UG070501
CALL QuickTPut2 (ZOutTxt$) ' UG070501
IF ZDownFiles < 2 THEN _
GOTO 20792
ZLastIndex = 0
ZOutTxt$ = "Edit Your Download List ([Y],N)" ' UG070501
ZTurboKey = - ZTurboKeyUser
GOSUB 21668
IF ZNo THEN _
LastDnld = 0 : _
GOTO 20792
Temp = 0
CALL OpenWork (2,ZNodeWorkFile$)
WHILE NOT EOF(2)
CALL ReadDir (2,1)
CALL BreakFileName (ZOutTxt$,DR$,ZWasY$,WasX$,ZTrue)
ZFileName$ = ZWasY$ + WasX$
ZOutTxt$ = "Still Download " + ZFileName$ + " (Y,[N])" ' UG070501
ZTurboKey = - ZTurboKeyUser ' UG070501
GOSUB 21669 ' UG070501
IF ZYes THEN _
Temp = Temp + 1 : _
ZOutTxt$(Temp) = ZFileName$
WEND
CLOSE 2
CALL SkipLine (1) ' UG070501
ZAnsIndex = 1
ReStart = (Temp > 0)
LastDnld = Temp
ZLastIndex = Temp
FOR WasX = 1 TO Temp
ZUserIn$(WasX) = ZOutTxt$(WasX)
NEXT
* REPLACING old line(s) by new
20793 IF ZRatioRestrict# > 0 THEN _
* ------[ first line different ]------
CALL SkipLine (1) : _ ' UG070501
CALL QuickTPut ("New Transfer Statistics Will Be: ", 1) : _ ' UG070501
CALL CheckRatio (ZTrue) : _ ' UG070501
CALL SkipLine (1) ' UG070501
RETURN
* REPLACING old line(s) by new
21660 ZSubParm = 1
* ------[ first line different ]------
CALL UglyTGet ' UG070501
* REPLACING old line(s) by new
* ------[ first line different ]------
21668 CALL UglyPopCmdStack ' UG070501
GOTO 21665 ' UG070501
* INSERTING new line(s)
21669 CALL PopCmdStack ' UG070501
GOTO 21665
* REPLACING old line(s) by new
21760 GOSUB 21780
IF ZFileSysParm > 1 THEN _
RETURN
IF ZBatchTransfer THEN _
CALL LinesInFile (ZNodeWorkFile$,ZDownFiles) _
ELSE ZDownFiles = 1
IF NOT DnldCompleted THEN _
ZAutoLogoffReq = ZFalse : _
ZWasDF$ = " Aborted" : _
GOTO 21768
CALL LogPDown (ZPersonalDnld,1+ZAnsIndex-FirstDnld)
WasX = ((ZRatioRestrict# > 0) AND ZEnforceRatios AND ZFreeDnld)
IF NOT WasX THEN _
ZDnlds = ZDnlds + ZDownFiles : _
ZGlobalDLToday! = ZGlobalDLToday! + ZDownFiles : _
ZGlobalDnlds = ZGlobalDnlds + ZDownFiles : _
ZDLBytes! = ZDLBytes! + ZNumDnldBytes! : _
ZGlobalDLBytes! = ZGlobalDLBytes! + ZNumDnldBytes! : _
ZDLToday! = ZDLToday! + ZDownFiles : _
ZBytesToday! = ZBytesToday! + ZNumDnldBytes! : _
ZGlobalBytesToday! = ZGlobalBytesToday! + ZNumDnldBytes!
ZNumDnldBytes! = 0
CALL Muzak (6)
ZWasDF$ = " Downloaded"
* ------[ first line different ]------
IF (ZAnsIndex = LastDnld OR NOT ZConcatFiles) THEN ' UG070501
CALL SkipLine (1) ' UG070501
CALL QuickTPut ("Download Complete",0) ' UG070501
ZOutTxt$ = "." ' UG070501
IF WasX THEN ' UG070501
ZOutTxt$ = ", But Not Counted Against Your Ratios." ' UG070501
END IF ' UG070501
CALL QuickTPut2 (ZOutTxt$) ' UG070501
END IF ' UG070501
* REPLACING old line(s) by new
* ------[ first line different ]------
21810 ZOutTxt$ = "Search for What Filename (Wildcards Allowed) or String" ' UG070501
ZMacroMin = 99
GOSUB 21668
IF ZWasQ = 0 THEN _
RETURN
* REPLACING old line(s) by new
21862 WasA1$ = RIGHT$(ZWasLM$,4) +_
LEFT$(ZWasLM$,2)
* ------[ first line different ]------
ZOutTxt$ = "New Files On/After What Date (MMDDYY) [S]ince for " + WasA1$ ' UG070501
GOSUB 21669 ' UG070501
IF ZAnsIndex = 1 AND ZLastIndex <> 1 THEN _ ' UG070501
CALL SkipLine (1) ' UG070501
CALL AraAllCaps (ZUserIn$(),ZAnsIndex)
IF ZWasQ = 0 OR ZUserIn$(ZAnsIndex) = "S" THEN _
WasRS$ = ZWasLM$ : _
GOTO 21866
* REPLACING old line(s) by new
* ------[ first line different ]------
21895 CALL QuickTPut2 ("Sorry, No Upload Space. Try Again Tomorrow.") : _ ' UG070501
RETURN
'
' * MAIN FILE SYSTEM ERROR TRAP - ALL ERRORS PASS THROUGH THIS ROUTINE
'
' (formerly lines 13000 to 13500 in RBBS-PC.BAS
* REPLACING old line(s) by new
21900 IF ZDebug THEN _
ZOutTxt$ = "RBBSSUB5 DEBUG Error Trap Entry ERL=" + _
STR$(ZWasEL) + _
" ERR=" + _
STR$(ZErrCode) : _
IF ZPrinter THEN _
CALL Printit(ZOutTxt$) _
ELSE CALL LPrnt(ZOutTxt$,1)
IF ZWasEL = 20126 AND ZErrCode = 53 THEN _
GOTO 20142
IF ZWasEL = 20242 AND ZErrCode = 62 THEN _
CALL UpdtCalr (ZFileSecFile$ + " bad format!",2) : _
GOTO 20247
IF ZWasEL = 20263 THEN _
ZOutTxt$ = "<Download aborted>" : _
DnldCompleted = ZFalse : _
GOTO 20390
IF ZWasEL = 20560 AND ZErrCode = 67 THEN _
GOTO 20451
IF ZWasEL = 20560 AND ZErrCode = 70 THEN _
IF VAL(ZFreeSpace$) > 1999 THEN _
GOTO 20610 _
ELSE GOSUB 21895 : _
GOTO 21700
IF ZWasEL = 20620 THEN _
GOTO 20670
IF ZWasEL = 20650 THEN _
GOTO 20670
IF ZWasEL = 20736 AND ZErrCode = 53 THEN _
GOTO 21700
IF ZWasEL = 20900 AND ZErrCode = 75 THEN _
GOTO 21230
IF ZWasEL = 20900 AND ZErrCode = 70 THEN _
GOSUB 21895 : _
GOTO 21230
IF ZWasEL = 21131 OR ZWasEL = 21220 THEN _
ZErrCode = 0 : _
GOTO 21230
IF ZWasEL = 21480 THEN _
CALL LogError : _
IF ZErrCode = 57 THEN _
* ------[ first line different ]------
CALL QuickTPut2 ("Error Reading File. Aborting Download.") : _ ' UG070501
DnldCompleted = ZFalse : _
GOTO 21230
* REPLACING old line(s) by new
63110 WasX$ = LEFT$(ZOutTxt$(2),1) ' ZWasSL = Security Level
CALL CheckInt (ZOutTxt$(2))
IF ZErrCode > 0 THEN _
GOTO 63105
IF WasX$ = "+" OR WasX$ = "-" THEN _
ZWasA = ZUserSecLevel + ZTestedIntValue _
ELSE ZWasA = ZTestedIntValue
IF ZWasA < ZSysopSecLevel THEN _
ZAdjustedSecurity = (ZWasA <> ZUserSecLevel) : _
IF ZAdjustedSecurity THEN _
ZUserSecLevel = ZWasA : _
MID$(ZUserRecord$,47,2) = MKI$(ZWasA) : _
* ------[ first line different ]------
CALL QuickTPut2 ("Door Changed Your Security Level to" + STR$(ZWasA)) : _ ' UG070501
CALL UpdtCalr ("Door reset security to "+STR$(ZWasA),2)
GOTO 63105
* REPLACING old line(s) by new
63470 ' $SUBTITLE: 'SetPrompt - sub to set prompts based on user security'
' $PAGE
'
' NAME -- SetPrompt
'
' INPUTS -- PARAMETER MEANING
' ZBegMain POSITION START OF MAIN CMDS
' ZBegFile POSITION START OF FILE CMDS
' ZBegUtil POSITION START OF UTIL CMDS
' ZBegLibrary POSITION START OF Library CMDS
'
' OUTPUTS -- PRESENT.OPTS$ DISPLAY WHAT USER CAN DO (1st)
' CALLERS.OPTS$ DISPLAY WHAT USER CAN DO (2nd)
' ZMainOpts$ MAIN OPTS USER CAN DO
' ZFileOpts$ FILE OPTS USER CAN DO
' ZUtilOpts$ UTIL OPTS USER CAN DO
' ZLibOpts$ Library OPTS USER CAN DO
'
' PURPOSE -- Sets command line display of what user can do by
' section and display of what all user can do
'
SUB SetPrompt STATIC
First = ZBegMain
Last = ZBegFile - 1
CALL SetOpts (ZMainOpts$,ZInvalidMainOpts$,First,Last)
First = ZBegFile
Last = ZBegUtil - 1
CALL SetOpts (ZFileOpts$,ZInvalidFileOpts$,First,Last)
First = ZBegUtil
Last = ZBegLibrary - 1
CALL SetOpts (ZUtilOpts$,ZInvalidUtilOpts$,First,Last)
First = ZBegLibrary
Last = ZBegLibrary + 6
CALL SetOpts (ZLibOpts$,ZInvalidLibraryOpts$,First,Last)
First = 50
Last = 56
CALL SetOpts (SysOpt$,ZInvalidSysOpts$,First,Last)
First = 46
Last = 49
CALL SetOpts (GlobalOpts$,InvalidGlobalOpts$,First,Last)
IF LEN(SysOpt$) > 0 THEN _
ZSystemOpts$ = "Sysop: " + _
SysOpt$
ZMainOpts$ = GlobalOpts$ + ZMainOpts$ + _
MID$(ZAllOpts$,INSTR(ZOrigCommands$,"G"),1)
ZFileOpts$ = GlobalOpts$ + _
ZFileOpts$
ZUtilOpts$ = GlobalOpts$ + _
ZUtilOpts$
ZLibOpts$ = GlobalOpts$ + _
ZLibOpts$
CALL SortString (SysOpt$)
CALL SortString (ZMainOpts$)
ZMainOpts$ = ZMainOpts$ + _
SysOpt$
CALL SortString (ZFileOpts$)
CALL SortString (ZUtilOpts$)
CALL SortString (ZLibOpts$)
CALL AddCommas (ZMainOpts$)
CALL AddCommas (ZFileOpts$)
CALL AddCommas (ZUtilOpts$)
CALL AddCommas (ZLibOpts$)
* ------[ first line different ]------
ZDirPrompt$ = "What Directories (" + _
MID$("U)pload,A)ll,P)ersonal,L)ist,E)xtended +/-,[Q]uit)", _
8 * (ZUserSecLevel => ZMinSecToView) + 9) ' UG070501
ZQuitPromptExpert$ = "Quit C,S, or to F,[M],U,@" ' UG070501
ZQuitPromptNovice$ = "Quit C)onference, S)ession or to Section " + _ ' UG070501
"F)ile, [M]ain, U)til or @)Library"
ZQuitList$ = "FMUS@C"
IF ZUserSecLevel < ZOptSec(18) THEN _
ZQuitPromptExpert$ = LEFT$(ZQuitPromptExpert$,23) : _
ZQuitPromptNovice$ = LEFT$(ZQuitPromptNovice$,61) : _
MID$(ZQuitList$,5) = " "
IF ZUserSecLevel < ZOptSec(15) THEN _
ZQuitPromptExpert$ = LEFT$(ZQuitPromptExpert$,22) + _
MID$(ZQuitPromptExpert$,25) : _
ZQuitPromptNovice$ = LEFT$(ZQuitPromptNovice$,56) + _
MID$(ZQuitPromptNovice$,63) : _
MID$(ZQuitList$,3,1) = " "
IF ZUserSecLevel < ZOptSec(6) THEN _
ZQuitPromptExpert$ = LEFT$(ZQuitPromptExpert$,16) + _
MID$(ZQuitPromptExpert$,19) : _
ZQuitPromptNovice$ = LEFT$(ZQuitPromptNovice$,41) + _
MID$(ZQuitPromptNovice$,49) : _
MID$(ZQuitList$,1,1) = " "
CALL SetSection
END SUB
* REPLACING old line(s) by new
63560 ' Set specified user flag
SUB SetUserFlag (RcvrRecNum, ChangeIndex, WhatGetting$) STATIC
FIELD #5, 128 AS ZUserRecord$
IF RcvrRecNum > 0 THEN _
ZUserFileIndex = RcvrRecNum : _
ZSubParm = 6 : _
CALL FileLock : _
GET 5, RcvrRecNum : _
WasX = CVI(MID$(ZUserRecord$,57,2)) : _
MID$(ZUserRecord$,57,2) = MKI$(WasX OR ChangeIndex) : _
PUT 5, RcvrRecNum : _
ZSubParm = 8 : _
CALL FileLock : _
* ------[ first line different ]------
CALL NameCaps (ZWorkAra$(1)) : _ ' UG070501
CALL QuickTPut1 (ZWorkAra$(1) + " Will Be Notified of New " + WhatGetting$ + ".") : _ ' UG070501
RcvrRecNum = 0
END SUB
* REPLACING old line(s) by new
* ------[ first line different ]------
63572 ZOutTxt$ = "Time Extension Reduced to"+ STR$(TimeToAdd) + _
" Due to " + ZOutTxt$ + " Event." : _ ' UG070501
CALL RingCaller
END SUB
* REPLACING old line(s) by new
63592 IF Showcur THEN _
CALL QuickTPut ("Change ",0) : _
CALL QuickTPut (Txt$,0) : _
CALL QuickTPut (" from ",0) : _
* ------[ first line different ]------
CALL QuickTPut (MID$(STR$(CurVal),2),0) : _ ' UG070501
CALL QuickTPut (" to (",0) _
ELSE CALL QuickTPut (Txt$,0) : _
CALL QuickTPut (" (",0)
CALL QuickTPut (MID$(STR$(MinVal),2),0) ' UG070501
CALL QuickTPut ("-",0) ' UG070501
CALL QuickTPut (MID$(STR$(MaxVal),2),0) ' UG070501
ZOutTxt$ = ", [Q]uit)" ' UG070501
* REPLACING old line(s) by new
* ------[ first line different ]------
63594 CALL UglyPopCmdStack ' UG070501
Temp$ = ZUserIn$(ZAnsIndex)
CALL AllCaps (Temp$)
CALL Trim (Temp$)
IF ZSubParm > -1 AND Temp$ <> "Q" AND ZWasQ <> 0 THEN _
GOTO 63595
ZWasQ = 0
IF ShowCur THEN _
CALL QuickTPut2 (Txt$ + " Unchanged.") ' UG070501
EXIT SUB
* REPLACING old line(s) by new
63595 CALL CheckInt (Temp$)
IF ZTestedIntValue < MinVal OR ZTestedIntValue > MaxVal THEN _
ZLastIndex = 0 : _
* ------[ first line different ]------
CALL QuickTPut2 ("Invalid Value: Min" + STR$(MinVal) + ", Max" + STR$(MaxVal) + ".") : _ ' UG070501
GOTO 63592
IF ShowCur THEN _
CALL QuickTPut2 (Txt$ + " is Now Set to" + STR$(ZTestedIntValue) + ".") ' UG070501
END SUB
* REPLACING old line(s) by new
63600 ' MarkItems - Converts a list of items ZUserIn$(), items ZAnsIndex
' thru ZLastIndex, into a marked list MarkedList$.
'
SUB MarkItems (IsMarking,MarkedList$,MarkedDesc$) STATIC
IF NOT IsMarking THEN _
EXIT SUB
FOR Temp = ZAnsIndex to ZLastIndex
MarkedList$ = MarkedList$ + ZUserIn$(Temp) + ZCarriageReturn$
NEXT
CALL ReportMarked (MarkedList$,MarkedDesc$)
END SUB
SUB ReportMarked (MarkedList$,ListDesc$) STATIC
CALL FindLast (MarkedList$,ZCarriageReturn$,Temp,ZLastIndex)
* ------[ first line different ]------
CALL QuickTPut2 ("There Are" + STR$(ZLastIndex) + " " + ListDesc$ + "s Now Marked.") ' UG070501
ZLastIndex = 0
END SUB
* REPLACING old line(s) by new
63605 ' AskItems - general routine for asking for a list of items.
' Calling program instructs what the valid commands
' are (ValidCmnd$), what the actual user command is
' (UserCmnd$), and whether to Mark the items. Returns
' list of items in ZUserIn$(). Supports lists for viewing,
' downloading, and marking. Gives option to operate
' on marked when items have been previously marked.
' Calling program tells what to mark (MarkedItems$)
' and how to describe the items gathering (ItemDesc$).
'
SUB AskItems (ValidCmnd$,UserCmnd$,DoMark,ItemDesc$,MarkedItems$) STATIC
CALL AllCaps (UserCmnd$)
Temp = INSTR(ValidCmnd$,UserCmnd$)
IF Temp = 0 OR UserCmnd$ = "" THEN _
EXIT SUB
* ------[ first line different ]------
Temp = INSTR("DVM",UserCmnd$) ' UG070501
IF Temp = 1 THEN _ ' UG070501
ZOutTxt$ = "Download" _ ' UG070501
ELSE _ ' UG070501
ZOutTxt$ = MID$("ViewMark",4*Temp-7,4) ' UG070501
ZOutTxt$ = ZOutTxt$ + " What " + ItemDesc$ + "s" ' UG070501
IF Temp < 3 THEN IF MarkedItems$ <> "" THEN _
ZoutTxt$ = ZOutTxt$ + ", M)arked"
ZOutTxt$ = ZOutTxt$ + ZPressEnter$ ' UG070501
ZStackC = ZTrue ' UG070501
CALL UglyPopCmdStack ' UG070501
IF ZWasQ > 0 AND DoMark AND Temp = 3 THEN _
CALL MarkItems (ZTrue,MarkedItems$,ItemDesc$)
END SUB
* REPLACING old line(s) by new
63615 ' * Sets up next message base link *
SUB NextConf (DoJoin) STATIC
IF ZLinkedConf$ = "" OR (NOT DoJoin) THEN _
EXIT SUB
EndConf = INSTR(ZLinkedConf$,ZCarriageReturn$)
ZHomeConf$ = LEFT$(ZLinkedConf$,EndConf-1)
IF ZNonStop THEN _
* ------[ first line different ]------
CALL QuickTPut1 ("Joining Linked Conference " + ZHomeConf$ + "...") _ ' UG070501
ELSE _ ' UG070501
ZOutTxt$ = "Continue to Linked Conference " + ZHomeConf$ + " ([Y],N)" : _ ' UG070501
ZTurboKey = -ZTurboKeyUser : _
ZSubParm = 1 : _
CALL UglyTGet : _ ' UG070501
IF ZNo THEN _
ZHomeConf$ = "" : _
ZGlobalRead = ZFalse : _
EXIT SUB
ZLinkedConf$ = RIGHT$(ZLinkedConf$,LEN(ZLinkedConf$)-EndConf)
END SUB
* REPLACING old line(s) by new
63635 ' * Reports who is doing echoing. Formerly 9525 of rbbs-pc.bas
SUB ReportEcho STATIC
IF ZEchoer$ = "R" THEN _
* ------[ first line different ]------
ZOutTxt$ = "RBBS Now Set" _ ' UG070501
ELSE IF ZEchoer$ = "C" THEN _ ' UG070501
ZOutTxt$ = "Please Set Your Communications Package" _ ' UG070501
ELSE ZOutTxt$ = "Intermediate Host Now Set" ' UG070501
CALL QuickTPut2 (ZOutTxt$ + " to Echo.") ' UG070501
END SUB
* REPLACING old line(s) by new
63640 ' * Welcomes caller on
SUB SayWelcome STATIC
LOCATE 24,1
CALL AMorPM
ZUserLogonTime! = TIMER
ZTimeLoggedOn$ = TIME$
ZLinesPrinted = 0
ZExpertUser = ZFalse
CALL SetExpert
ZOutTxt$ = ""
IF ZMaxNodes > 1 THEN _
ZOutTxt$ = " - Node " + ZNodeID$
IF ZReliableMode THEN _
* ------[ first line different ]------
ZOutTxt$ = ZOutTxt$ + " (ARQ)" ' UG070501
IF ZRBBSName$ <> "" THEN _ ' UG070501
CALL QuickTPut1 ("Welcome to " + ZRBBSName$ + ZOutTxt$) ' UG070501
CALL TestANSI
ZTestParity = ZTrue
ZStopInterrupts = ZTrue
ZFileName$ = ZPreLog$
CALL FlushCom (WasX$)
ZCommPortStack$ = ""
END SUB
* REPLACING old line(s) by new
63650 ' * Sets privileges based on PASSWRDS file
' * Formerly 5135-5160 in RBBS-PC.BAS
SUB SetPrivileges STATIC
ZWasZ$ = ""
CALL SrchPasswrds (Found)
IF NOT Found THEN _
ZTempTimeAllowed = ZMinsPerSessionDef : _
ZTempMaxPerDay = ZMaxPerDayDef : _
ZTempExpiredSec = ZExpiredSec : _
ZMaxBank = ZMaxBankTimeDef _
ELSE ZTimeLockSet = ZTempTimeLock : _
ZDaysInRegPeriod = ZTempRegPeriod : _
ZMaxBank = ZTempMaxBank
ZMinsPerSession = ZTempTimeAllowed
ZMaxPerDay = -(ZMaxPerDay * (ZTempMaxPerDay <= 0)) - _
(ZTempMaxPerDay * (ZTempMaxPerDay > 0))
IF ZLimitMinsPerSession THEN _
IF ZMinsPerSession > ZLimitMinsPerSession THEN _
ZMinsPerSession = ZLimitMinsPerSession : _
* ------[ first line different ]------
ZOutTxt$ = "An External Event is Coming Up in" + _
STR$(ZMinsPerSession) + _
" Minutes." : _ ' UG070501
CALL SkipLine(1) : _ ' UG070501
CALL QuickTput(ZOutTxt$,1) : _ ' UG070501
ZOutTxt$ = "Your Time Online Has Been Shortened." : _ ' UG070501
CALL RingCaller : _
CALL SkipLine (1) ' UG070501
CALL SetSessionTime
END SUB
* REPLACING old line(s) by new
63710 CALL SetGraphic(2)
ZHiLiteOff = ZFalse
* ------[ first line different ]------
CALL QuickTPut1 ("ANSI Support Detected...") ' UG070501
END SUB